package com.example.demo.controller.admincontroller;

import com.example.demo.common.Result;
import com.example.demo.service.DataAnalysisService;
import com.example.demo.vo.DataAnalysisVO;
import org.springframework.web.bind.annotation.*;
import lombok.RequiredArgsConstructor;

/**
 * 数据分析控制器
 */
@RestController
@RequestMapping("/admin/analysis")
@RequiredArgsConstructor
public class DataAnalysisController {
    
    private final DataAnalysisService dataAnalysisService;
    
    /**
     * 获取数据分析概览
     * @return 数据分析结果
     */
    @GetMapping("/overview")
    public Result<DataAnalysisVO> getAnalysisData() {
        return Result.success(dataAnalysisService.getAnalysisData());
    }
} 